package com.tudouji.project.flow.service.impl;

import java.util.List;

import com.tudouji.common.utils.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tudouji.project.flow.mapper.FlowconditionsMapper;
import com.tudouji.project.flow.domain.Flowconditions;
import com.tudouji.project.flow.service.IFlowconditionsService;

/**
 * 流程条件Service业务层处理
 * 
 * @author tudouji
 * @date 2021-05-06
 */
@Service
public class FlowconditionsServiceImpl implements IFlowconditionsService 
{
    @Autowired
    private FlowconditionsMapper flowconditionsMapper;

    /**
     * 查询流程条件
     * 
     * @param guid 流程条件ID
     * @return 流程条件
     */
    @Override
    public Flowconditions selectFlowconditionsById(String guid)
    {
        return flowconditionsMapper.selectFlowconditionsById(guid);
    }

    @Override
    public Flowconditions selectFlowConditionsById(Long id) {
        return flowconditionsMapper.selectFlowConditionsById(id);
    }

    /**
     * 查询流程条件列表
     * 
     * @param flowconditions 流程条件
     * @return 流程条件
     */
    @Override
    public List<Flowconditions> selectFlowconditionsList(Flowconditions flowconditions)
    {
        return flowconditionsMapper.selectFlowconditionsList(flowconditions);
    }

    @Override
    public List<Flowconditions> selectFlowConditionsList(Flowconditions flowconditions) {
        List<Flowconditions> flowconditions1=flowconditionsMapper.selectFlowConditionsList(flowconditions);
        return flowconditions1;
    }

    /**
     * 新增流程条件
     * 
     * @param flowconditions 流程条件
     * @return 结果
     */
    @Override
    public int insertFlowconditions(Flowconditions flowconditions)
    {
        flowconditions.setGuid(IdUtils.fastSimpleUUID());
        return flowconditionsMapper.insertFlowconditions(flowconditions);
    }

    @Override
    public int insertFlowConditions(Flowconditions flowconditions) {
        return flowconditionsMapper.insertFlowConditions(flowconditions);
    }

    /**
     * 修改流程条件
     * 
     * @param flowconditions 流程条件
     * @return 结果
     */
    @Override
    public int updateFlowconditions(Flowconditions flowconditions)
    {
        System.out.println(flowconditions.getIssendoa());
        return flowconditionsMapper.updateFlowconditions(flowconditions);
    }

    @Override
    public int updateFlowConditions(Flowconditions flowconditions) {
        return flowconditionsMapper.updateFlowConditions(flowconditions);
    }

    /**
     * 批量删除流程条件
     * 
     * @param guids 需要删除的流程条件ID
     * @return 结果
     */
    @Override
    public int deleteFlowconditionsByIds(String[] guids)
    {
        return flowconditionsMapper.deleteFlowconditionsByIds(guids);
    }

    /**
     * 删除流程条件信息
     * 
     * @param guid 流程条件ID
     * @return 结果
     */
    @Override
    public int deleteFlowconditionsById(String guid)
    {
        return flowconditionsMapper.deleteFlowconditionsById(guid);
    }

    @Override
    public int deleteFlowConditionsById(Long id) {
        return flowconditionsMapper.deleteFlowConditionsById(id);
    }
}
